
<div class="FormWrap Comments" id="goods-comment">
  <div class="division boxBrown">
    <div class="mainReply"><span class="author fontcolorOrange"><{$comment.author}></span><{t}>说：<{/t}><span class="timpstamp font10px fontcolorGray"><{$comment.time|userdate}></span>
      <!--<h4><{$comment.title|escape:'html'}></h4>-->
      <div><{$comment.comment}></div>
    </div>
  </div>

    <div class="replies prepend-1 "> <{foreach from=$comment.reply item=items}>
      <div class="replyitem division "><span class="author fontcolorOrange"><{$items.author}>
        <!--<{if $items.levelname!=""}> [<{$items.levelname}>]<{/if}>-->
         <{t}>回复：<{/t}></span><span class="timpstamp font10px fontcolorGray"><{$items.time|cdate:'SDATE_STIME'}></span>
        <div><{$items.comment}></div>
      </div>
      <{/foreach}> </div>
<script>
    var checkFormReqs =function(e){
           e    = new Event(e);
       var form= $(e.target);
          
       var reqs = $$(form.getElements('input[type=text]'),form.getElements('textarea'));

       if(reqs.some(function(req){
              
            if(req.getValue().trim()==''){
                       req.focus();
                       MessageBox.error('请完善表单必填项.');
                       return true;
            }
              
              return false;
              
       
       })){
           
           e.stop();
       
       }       

    };

	/*验证码刷新*/
	function changeimg(id,type){
		$(id).set('src','<{link ctl="passport" act="verifyCode" arg0="'+type+'"}>#'+$time());
	};
 </script>
  <h3><{t}>发表回复<{/t}></h3>
  <form class=" division" method="post" action='<{link ctl="comment" act="toReply" arg0=$comment.comment_id arg1=$comment.object_type}>' onsubmit='checkFormReqs(event);'>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="forform">
      <tr>
        <th><em>*</em><{t}>联系方式：<{/t}></th>
        <td><{input type="text" required="true" size=20 name="contact"}><span class="infotips"><{t}>(可以是电话、email、qq等)<{/t}></span></td>
      </tr>
      <tr>
        <th><em>*</em><{t}>回复内容：<{/t}></th>
        <td><{input type="textarea" required="true" rows="5" name="comment" style="width:80%" }></td>
      </tr>
	  <{if $askshow == "on"}>
		<tr>
            <th><em>*</em><{t}>验证码：<{/t}></th>
              <td><{input type="text" required="true" size="4" maxlength="4" name="askverifyCode"}>&nbsp;<img src="<{link ctl="passport" act="verifyCode" arg0="ask"}>" border="1" id="askimgVerifyCode"/><a href="javascript:changeimg('askimgVerifyCode','ask')"><{t}>&nbsp;看不清楚?换个图片<{/t}></a></td>
            <{/if}>
            <{if $discussshow == "on"}>
             <tr>
            <th><em>*</em><{t}>验证码：<{/t}></th>
                <td><{input type="text" required="true" size="4" maxlength="4" name="discussverifyCode"}>&nbsp;<img src="<{link ctl="passport" act="verifyCode" arg0="discuss"}>" border="1" id="discussimgVerifyCode"/><a href="javascript:changeimg('discussimgVerifyCode','discuss')"><{t}>&nbsp;看不清楚?换个图片<{/t}></a>
                </td>
            </tr>
            <{/if}>
      <tr>
        <th></th>
        <td><input type="submit" class="buttonstyle" value="回复"></td>
      </tr>
    </table>
  </form>
</div>
